package cn.com.idmy.auth.oauth;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import lombok.experimental.Accessors;

import static cn.com.idmy.auth.oauth.OauthConsts.ACCESS_TOKEN;
import static cn.com.idmy.auth.oauth.OauthConsts.REFRESH_TOKEN;

@Data
@Accessors(fluent = true)
public class AccessToken {
    @JSONField(name = ACCESS_TOKEN)
    protected String accessToken;
    @JSONField(name = REFRESH_TOKEN)
    protected String refreshToken;
    @JSONField(name = "expires_in")
    protected long exp;
    @JSONField(name = "refresh_expires_in")
    protected long refreshExp;
    @JSONField(name = "id_token")
    protected String idToken;
    @JSONField(name = "token_type")
    protected String tokenType = "Bearer";
    protected String scope;
}
